package one;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.server.SeleniumServer;

@SuppressWarnings("deprecation")
public class google_screenshotentirepage1 extends SeleneseTestCase {
	public SeleniumServer ss;
	@Before
	public void setUp() throws Exception {
		ss=new SeleniumServer();
		ss.start();
		selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.google.co.in");
		
		selenium.start();
	}



	@Test
	public void testUntitled() throws Exception {
		//open the URL in browser
				selenium.open("/");
				//maximize the window
				//selenium.windowMaximize();
				//click options button
				selenium.click("id=gbi5");
				
				//click on advanced search link
				selenium.click("link=Advanced search");
				//wait for page to load
				selenium.waitForPageToLoad("30000");
			
				//capture screenshot
				selenium.captureEntirePageScreenshot("C://Users//Sirisha//Deskto//QA//ECLIPSE//eclipse_examples//screenshot.png","");
				selenium.captureScreenshot("C://Users//Sirisha//Deskto//QA//ECLIPSE//eclipse_examples//screenshot.png");
				Thread.sleep(5000);
	
		
	}

	@After
	public void tearDown() throws Exception {
		selenium.stop();
		ss.stop();
	}
}

